package ten;

import java.util.concurrent.*;

public class 十三Callable implements Callable<Integer> {
    @Override
    public Integer call() throws Exception {
        return 0;
    }

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        十三Callable rac = new 十三Callable();
        ExecutorService ser = Executors.newFixedThreadPool(2);
        Future<Integer> result1 = ser.submit(rac);
        Future<Integer> result2 = ser.submit(rac);
        Integer r1 = result1.get();
        Integer r2 = result2.get();
        System.out.println(r1 + "---->" + r2);
        ser.shutdown();
    }
}
